<!--  -->
<template>
  <div class="add-btn" @click.stop="handleClick">
    <slot name="icon">
      <img src="./img/add.png" alt="" />
    </slot>
    <div class="fz-14" style="white-space: nowrap">{{ title }}</div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    title: { type: String, default: '添加用户' }, //
  },
  data() {
    return {}
  },

  computed: {},

  methods: {
    handleClick() {
      this.$emit('addClick')
      this.$emit('click')
    },
  },
}
</script>
<style lang="scss" scoped>
.add-btn {
  display: flex;
  width: fit-content;
  padding: vh(7px) vw(15px);
  font-size: vw(14px);
  color: #d12d1f;
  border: 1px solid #d12d1f;
  border-radius: 4px;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  &:hover {
    cursor: pointer;
  }

  img {
    width: vw(14px);
    margin-right: vw(6px);
  }
}
</style>
